<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/star">首页</a>
                </li>
                <li>
                    <a href="#/star/metric2/data_metric_list/{{vm.r.biz}}">指标列表</a>
                </li>
                <li class="active">指标详情</li>
            </ul>
        </div>
    </div>
</div>

<style type="text/css">
    table tr td {
        border: none;
    }
</style>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-8 col-md-offset-2">
                <h2 style="text-align: center">详情信息</h2>
                <form name="form" ng-submit="form.$valid&&addMetric()" novalidate>
                    <table border=0 cellpadding=0 cellspacing=0 frame=void>
                        <tr>
                            <td colspan="4" width="400px"  class="form-group">
                                <label style="padding: 0 0 5px">（标准）指标英文</label>
                                <input type="text" class="form-control" name="indexStd" ng-model="vm.p.indexStd" />
                            </td>
                            <td colspan="4" width="400px"  class="form-group">
                                <label style="padding: 0 0 5px">（中文）指标名称</label>
                                <input type="text" class="form-control" name="indexTitle" ng-model="vm.p.indexTitle" />
                            </td>
                            <td colspan="4" width="400px"  class="form-group">
                                <label style="padding: 0 0 5px">（中文）原子指标</label>
                                <input type="text" class="form-control" name="indexCn" ng-model="vm.p.indexCn" />
                            </td>
                        </tr>

                        <tr>
<!--                            <td width="400px" colspan="4" class="form-group">-->
<!--                                <label style="padding: 0 0 5px">业务板块</label>-->
<!--                                <select class="form-control" ng-model="vm.p.bizAreaDefine"-->
<!--                                    ng-options="x.name for x in vm.d.bizAreaDefine" required></select>-->
<!--                            </td>-->

                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">业务域</label>
                                <select name="topicGroup" class="form-control"
                                        ng-model="vm.p.topicGroupEx"
                                        ng-options="x.text for x in vm.dim.dimTree"
                                        ng-change="selectTopicGroupChange()">
                                </select>
                            </td>
                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">业务主题</label>
                                <select name="topic" class="form-control"
                                        ng-model="vm.p.topicEx"
                                        ng-options="x.text for x in vm.dim.selectTopicNodes">
                                </select>
                            </td>
                            <td colspan="4" class="form-group">
                            </td>
                        </tr>


                        <tr>
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">指标结果表</label>
                                <input type="text" class="form-control" name="indexTbl" ng-model="vm.p.indexTbl" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">业务口径（"定义+公式+说明"中间用逗号分开）</label>
                                <textarea class="form-control" name="indexDefine" ng-model="vm.p.indexDefine"
                                    style="height: 80px" required></textarea>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="12" class="form-group">
                                指标业务过程定义：<a href="https://docs.qq.com/doc/DSGFPTEdlT2JTTVVN"> <u>业务过程定义(DOC)</u> </a>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">业务方向(ToM-销售管理)</label>
                                <select class="form-control" ng-model="vm.p.appNode"
                                    ng-options="x.name for x in vm.d.appNodeDefine" required></select>
                            </td>

                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">用户生命旅程</label>
                                <select class="form-control" ng-model="vm.p.umNode"
                                    ng-options="x.name for x in vm.d.bsDefine[vm.p.appNode.name]" required></select>
                            </td>
                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">业务系统</label>
                                <select class="form-control" ng-model="vm.p.bsNode"
                                    ng-options="x.name for x in vm.p.umNode.bsList" required></select>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">操作状态</label>
                                <select class="form-control" ng-model="vm.p.statusOptEx"
                                    ng-options="x.name for x in vm.d.statusOptDefine" required></select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">负责人（OA账号）</label>
                                <input type="text" class="form-control" name="ownerId" ng-model="vm.p.ownerId" />
                            </td>
                        </tr>

                        <tr>
                            <td colspan="12" class="form-group" align="right">
                                <hr />
                                选填部分：<a href="" ng-click="showOptions()"> <u>{{vm.p.showTxt}}</u> </a>
                            </td>
                        </tr>
                        <tr ng-show="vm.p.show">
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">计算口径（SQL伪代码）</label>
                                <textarea class="form-control" name="indexImpl" ng-model="vm.p.indexImpl"
                                    style="height: 80px" required></textarea>
                            </td>
                        </tr>
                        <tr ng-show="vm.p.show">
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">获取结果方式（SQL伪代码）</label>
                                <textarea class="form-control" name="indexSql" ng-model="vm.p.indexSql"
                                    style="height: 50px" required></textarea>
                            </td>
                        </tr>
                        <tr ng-show="vm.p.show">
                            <td colspan="12" class="form-group">
                                指标大盘展示定义：
                            </td>
                        </tr>
                        <tr ng-show="vm.p.show">
                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">指标分组</label>
                                <input type="text" class="form-control" name="zgroup" ng-model="vm.p.zgroup" />
                            </td>
                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">指标分层</label>
                                <input type="text" class="form-control" name="zlevel" ng-model="vm.p.zlevel" />
                            </td>
                            <td colspan="4" class="form-group">
                                <label style="padding: 0 0 5px">指标排序</label>
                                <input type="text" class="form-control" name="zindex" ng-model="vm.p.zindex" />
                            </td>
                        </tr>
                        <tr ng-show="vm.p.show">
                            <td colspan="12" class="form-group">
                                <label style="padding: 0 0 5px">备注说明</label>
                                <textarea class="form-control" name="indexDesc" ng-model="vm.p.indexDesc"
                                    style="height: 50px" required></textarea>
                            </td>
                        </tr>
                        <tr ng-show="vm.p.show">
                            <td colspan="12" class="form-group">
                                <hr />
                            </td>
                        </tr>

                    </table>
                    <div class="form-group">
                        <input class="btn btn-primary" type="submit" value="确定" />
                        <a href="#/star/metric2/data_metric_list/{{vm.r.biz}}" class="btn btn-default">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--/.container-->